package cn.codenest.springboot.mongo.dao.impl;

import cn.codenest.springboot.mongo.dao.StgtypeDAO;
import cn.codenest.springboot.mongo.entity.StgtypeEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Component;

@Component
public class StgtypeDAOImpl implements StgtypeDAO {

    @Autowired
    MongoTemplate mongoTemplate;

    @Override
    public void saveStgtype(StgtypeEntity stgtypeEntity) {
        mongoTemplate.save(stgtypeEntity, StgtypeEntity.COLLECTION_NAME);
    }
}
